package cn.wen.mybatis.framework.builder;import cn.wen.mybatis.framework.cache.Cache;/** * 缓存解析 * 映射文件解析_二级缓存及cache与cache-ref的解析. 首先，在mybatis的配置文件中， * 要将settings的子标签setting的属性 cacheEnabled 的值设为true，默认即为true */public class CacheRefResolver {    private final MapperBuilderAssistant assistant;    private final String cacheRefNamespace;    public CacheRefResolver(MapperBuilderAssistant assistant, String cacheRefNamespace) {        this.assistant = assistant;        this.cacheRefNamespace = cacheRefNamespace;    }    /**     * 将当前缓存空间命名传入到cache缓存中     * @return     */    public Cache resolveCacheRef() {        return assistant.useCacheRef(cacheRefNamespace);    }}